Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resume animation on interruption #769

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

gorhom
Copy link
Owner

@gorhom gorhom commented Dec 5, 2021

Closes #632 #575

Motivation

This PR will allow the sheet to resume the snap animation when user interrupted it.

This issue was noticeable on Android due to Gesture Handler platform handling to the event onStart will be fired immediately when user touch the sheet, while on iOS, it will only start when user start panning.

Installation

yarn add ssh://git@github.com:gorhom/react-native-bottom-sheet#fix/632-resume-animation-on-interruption

@gorhom gorhom added the v4 Written in Reanimated v2 label Dec 5, 2021
@likern
Copy link
Contributor

likern commented Dec 5, 2021

@gorhom I've tested and couldn't reproduce freeze of bottom-sheet. I think it's been solved. Thank you very much!

If we could have duration it would be easier to reproduce bugs (for slowing animations), like here software-mansion/react-native-reanimated#2691.

@likern
Copy link
Contributor

likern commented Dec 5, 2021

This issue was noticeable on Android due to Gesture Handler platform handling to the event onStart will be fired immediately when user touch the sheet, while on iOS, it will only start when user start panning.

Is this bug in RNGH? Maybe to submit to there?

@gorhom
Copy link
Owner Author

gorhom commented Dec 5, 2021

@gorhom I've tested and couldn't reproduce freeze of bottom-sheet. I think it's been solved. Thank you very much!

If we could have duration it would be easier to reproduce bugs (for slowing animations), like here software-mansion/react-native-reanimated#2691.

you could use:

const animationConfigs = useBottomSheetTimingConfigs({
  duration: 5000
})

@gorhom
Copy link
Owner Author

gorhom commented Dec 5, 2021

@likern thanks for testing 👍

@gorhom gorhom merged commit f2a9332 into master Dec 5, 2021
@gorhom gorhom deleted the fix/632-resume-animation-on-interruption branch December 5, 2021 20:25
bulkinav pushed a commit to bulkinav/react-native-bottom-sheet that referenced this pull request Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 Written in Reanimated v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v4] handleUnmountSheet seems to fire twice in some scenarios
2 participants